package com.lkei.service.impl;

import com.lkei.dao.MajorDAO;
import com.lkei.entity.Major;
import com.lkei.service.MajorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("majorService")
public class MajorServiceImpl implements MajorService {

    @Autowired
    private MajorDAO majorDAO;


    @Override
    public List<Major> findMajorByDepartmentID(Integer department_id) {
        return majorDAO.findMajorByDepartmentID(department_id);
    }

    @Override
    public Integer findDepartmentIDByMajorID(Integer MajorID) {
        return majorDAO.findDepartmentIDByMajorID(MajorID);
    }

    @Override
    public List<Major> findByStudentID(Long StudentID) {
        return majorDAO.findByStudentID(StudentID);
    }
}
